#if !defined(AFX_CQMPLUGIN_H__8D2C77FD_C8DC_41F9_99CC_03084B9C4310__INCLUDED_)
#define AFX_CQMPLUGIN_H__8D2C77FD_C8DC_41F9_99CC_03084B9C4310__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CQMPlugin.h : header file
//

#include "GetColorSimilarity.h"

/////////////////////////////////////////////////////////////////////////////
// CQMPlugin command target


class CQMPlugin : public CCmdTarget
{
	DECLARE_DYNCREATE(CQMPlugin)

	CQMPlugin();           // protected constructor used by dynamic creation

// Attributes
public:
	struct DESCRIPTION_LIST
	{
		char *m_lpszItemName;
		char *m_lpszDescription;
		char *m_lpszInterpretTemplate;
	};

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CQMPlugin)
	public:
	virtual void OnFinalRelease();
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CQMPlugin();
	afx_msg BSTR GetPluginDescription(LPCTSTR bstrItemName);
	afx_msg BSTR GetPluginInterpretTemplate(LPCTSTR bstrItemName);

	// Generated message map functions
	//{{AFX_MSG(CQMPlugin)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_OLECREATE(CQMPlugin)
	DECLARE_MESSAGE_MAP()

	// Generated OLE dispatch map functions
	//{{AFX_DISPATCH(CQMPlugin)
	afx_msg BSTR Test1();
	afx_msg long Test2(long iNumber1, long iNumber2);
	afx_msg BSTR Test3(LPCTSTR bstrString1, LPCTSTR bstrString2);
	afx_msg void GetScreenResolution(VARIANT FAR* ResolutionX, VARIANT FAR* ResolutionY);
	afx_msg long FindColorDiffInRegions(long iSampleImgId);
	afx_msg void GetColorDiffInRegion(VARIANT FAR* x, VARIANT FAR* y,VARIANT FAR* iSimilarity);
	afx_msg long GetPixelColorEx(long x, long y,long iColor, double iSimilarity);
	afx_msg long ApproachColor(long iSourColor, long iDestColor);
	afx_msg void Log(LPCTSTR sLogStr);
	afx_msg long InitStandardImg(long iLeft, long iTop, long iWidth, long iHeight,long iRegionLength);
	afx_msg long MtDecode();
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
	DECLARE_INTERFACE_MAP()

private:
	static DESCRIPTION_LIST m_DescriptionList[];
	static const int m_iDescriptionListSize;	
public:
	LOG4CPLUS_CLASS_DECLARE(_logger)	
	static MethodContainer m_met;
	static GetColorSimilarity m_getClrSim;
	static vector<BYTE> m_imgData[3];
	static vector<BYTE> m_standardImgData;
	static int DoMtDecode(BYTE *pSampleBmpValue,int width);
	static int GetComponentNum(long iComponentColor);
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CQMPLUGIN_H__8D2C77FD_C8DC_41F9_99CC_03084B9C4310__INCLUDED_)
